<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/axios-0.18.0.js"></script>
</head>
<body>
<button onclick="send()"> 请求</button>
<script>
    function send() {
        axios.get("http://localhost/ajax/AjaxServlet")
            .then(function (resp) {
                alert(resp.data)
            });
    }
</script>
</body>
</html>